<?php


/**
 * Class WxmessageController
 */
class WxmessageController extends BaseController{
	public $pro_code1 = array();
    public function init(){
		parent::init();
    }
    public function messagedetailAction(){
        $id = $this->post('id')?$this->post('id'):$this->get('id');
        $message_model = BaseController::createMode(BaseController::$default_db,'t_26_notice_info');
        $red_model = BaseController::createMode(BaseController::$default_db,'t_26_notice_read');
        $read_info = $red_model->getOne( array('user_id'=> LoginHelper::getUserId(), 'notice_id'=>$id));
        if(empty($read_info)){
            $res = $red_model->insert(array('user_id'=>LoginHelper::getUserId(),'notice_id'=>$id, 'insert_dt'=>date("Y-m-d H:i:s")));
        }
        $list = $message_model->where(array('id'=>$id))->select();
        $this->assign('data',$list);
        $this->display();
    }		
}